// 系统公告
var smgColumns = [{
  id: 'number',
  title: '序号',
  width: 45,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'msg',
  title: '公告内容',
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'time',
  title: '时间',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, 
{
  id: 'operation',
  title: '操作',
  width: 130,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-info" onclick="edit(' + record.id + ');"><i class="fa fa-edit"></i>  编辑</button>';
    content += '  ';
    content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}
];
var smgOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '系统公告',
  datas: [{
    number: '1',
    msg: '公告内容测试数据',
    time: '2018/01/02 12:00:00',
  }, ],
  columns: smgColumns,
  gridContainer: 'smgContainer',
  toolbarContainer: 'smgToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var smgGrid = $.fn.dlshouwen.grid.init(smgOption);
$(function () {
  smgGrid.load();
});

// 项目信息
var msgColumns = [{
  id: 'number',
  title: '序号',
  width: 45,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'type',
  title: '类型',
  width: 73,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'msg',
  title: '具体内容',
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'time',
  title: '时间',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, 
// {
//   id: 'operation',
//   title: '操作',
//   width: 130,
//   type: 'string',
//   columnClass: 'text-center',
//   resolution: function (value, record, column, grid, dataNo, columnNo) {
//     var content = '';
//     content += '<button class="btn btn-xs btn-info" onclick="edit(' + record.id + ');"><i class="fa fa-edit"></i>  编辑</button>';
//     content += '  ';
//     content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
//     return content;
//   }
// }
];
var msgOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '系统信息',
  datas: [{
    number: '1',
    type: '项目动态',
    msg: '具体内容测试数据',
    time: '2018/01/02 12:00:00',
  }, ],
  columns: msgColumns,
  gridContainer: 'msgContainer',
  toolbarContainer: 'msgToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var msgGrid = $.fn.dlshouwen.grid.init(msgOption);
$(function () {
  msgGrid.load();
});


// 帮助列表
var helpColumns = [{
  id: 'number',
  title: '序号',
  width: 45,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'title',
  title: '标题',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'text',
  title: '内容',
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'time',
  title: '发布时间',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'name',
  title: '发布人',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, 
{
  id: 'operation',
  title: '操作',
  width: 130,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-info" onclick="edit(' + record.id + ');"><i class="fa fa-edit"></i>  编辑</button>';
    content += '  ';
    content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}
];
var helpOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '帮助列表',
  datas: [{
    number: '1',
    title: '帮助1',
    text: '测试数据',
    time: '2018/01/02 12:00:00',
    name: '张三'
  }, ],
  columns: helpColumns,
  gridContainer: 'helpContainer',
  toolbarContainer: 'helpToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var helpGrid = $.fn.dlshouwen.grid.init(helpOption);
$(function () {
  helpGrid.load();
});